<?php
/**
 * RichCore Forms
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Form
 * @package    Form_Person
 * @copyright  Copyright (c) 2005-2010 RichCongress. (http://www.richcongress.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 * @version    $Id: Delete.php 20096 2010-09-23 02:05:09Z benjamin $
 */




class Form_Person_Delete extends ZendX_JQuery_Form {
	
	function __construct($options = null, Zend_Translate $translator = null) {
		
		parent::__construct($options);
		
		$this->setAction($options['action'])
		     ->setMethod('post')
		     ->setAttrib('class', 'form')
		     ->setAttrib('name', 'person-form')
		     ->setAttrib('id', 'person-form')
		     ->removeDecorator('tag'); 
		
		// person id 
		$id = new Zend_Form_Element_Hidden('id');
		$id->setAutoInsertNotEmptyValidator(true)
			 ->setRequired(true)
	         ->addFilter('StripTags')
	         ->addFilter('StringTrim')
	         ->addValidator('NotEmpty')
	         ->setValue($options['id'])
	         ->setDecorators(array(
					    'ViewHelper',
					    'Description',
					    'Errors',
					    array('HtmlTag', array('tag' => 'span')),
					    array('Label', array('tag' => 'label')),
			 ));
		
		 // Add elements to form 
		$this->addElement($id);
	}
}

